import React, { StrictMode, Suspense } from 'react';
import * as ReactDOM from 'react-dom/client';
import './styles.css';
import { ThemeContextProvider, I18nProvider } from '@dev_deom/ui-shared';
import { RouterProvider } from 'react-router-dom';
import router from './router/router';

const root = ReactDOM.createRoot(
  document.getElementById('root') as HTMLElement
);

root.render(
  <StrictMode>
    <I18nProvider>
      <ThemeContextProvider>
        <Suspense fallback={<div>Loading...</div>}>
          <RouterProvider router={router} />
        </Suspense>
      </ThemeContextProvider>
    </I18nProvider>
  </StrictMode>
);